<html>
<head><meta charset="utf-8"><title>logging when using x.py · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html">logging when using x.py</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="209429382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429382">(Sep 08 2020 at 19:00)</a>:</h4>
<p>How do I get tracing::debug! lines when using x.py test?<br>
prepending RUSTC_LOG=rustc_privacy didnt seem to work...</p>



<a name="209429609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429609">(Sep 08 2020 at 19:02)</a>:</h4>
<p>you need to set <code>debug = true</code> in <code>config.toml</code></p>



<a name="209429640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429640">(Sep 08 2020 at 19:02)</a>:</h4>
<p>unfortunately this requires rebuilding the whole compiler :(</p>



<a name="209429768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429768">(Sep 08 2020 at 19:03)</a>:</h4>
<p>er, debug-assertions = true</p>



<a name="209429787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429787">(Sep 08 2020 at 19:03)</a>:</h4>
<p>and probably std-debug-assertions = false if you want things to be faster</p>



<a name="209429855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429855">(Sep 08 2020 at 19:04)</a>:</h4>
<p>probably we should have a debug-logging = true</p>



<a name="209429889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209429889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209429889">(Sep 08 2020 at 19:04)</a>:</h4>
<p>that would be nice</p>



<a name="209430097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209430097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209430097">(Sep 08 2020 at 19:06)</a>:</h4>
<p>ah thanks everyone, ill try debug-assertions = true and debug-assertions-std = false, it seems to be working!</p>



<a name="209430120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209430120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209430120">(Sep 08 2020 at 19:07)</a>:</h4>
<p>hmm, debug-logging would be nice, maybe ill look into that</p>



<a name="209532368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209532368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209532368">(Sep 09 2020 at 16:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> what would be the exact semantics of debug-logging that you are looking for?</p>



<a name="209532479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209532479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209532479">(Sep 09 2020 at 16:08)</a>:</h4>
<p>ideally we'd not enable debug asserts at all and instead toggle the feature on tracing based on this</p>



<a name="209532526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209532526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209532526">(Sep 09 2020 at 16:09)</a>:</h4>
<p>i.e., debug assertions would be orthogonal to whether logging is complete or not</p>



<a name="209535788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209535788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209535788">(Sep 09 2020 at 16:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> ah i see, I need to dig into how debug_assertions ends up turning on logging</p>



<a name="209535868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209535868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209535868">(Sep 09 2020 at 16:38)</a>:</h4>
<p>There is a feature enabled on tracing somewhere</p>



<a name="209535917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209535917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209535917">(Sep 09 2020 at 16:38)</a>:</h4>
<p>Something like release_max_level_debug</p>



<a name="209541574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209541574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Gus Wynn <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209541574">(Sep 09 2020 at 17:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/logging.20when.20using.20x.2Epy/near/209535917">said</a>:</p>
<blockquote>
<p>Something like release_max_level_debug</p>
</blockquote>
<p>ah i didn't realize it actually tracing that is checking debug_assertions </p>
<p>also the order here means I can't just ADD the max_level_trace feature in bootstrap, as rustc_driver's Cargo.toml has the default release_max_level_info...need to think about this</p>



<a name="209548253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209548253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209548253">(Sep 09 2020 at 18:16)</a>:</h4>
<p><span class="user-mention" data-user-id="257428">@Gus Wynn</span> my suggestion would be to <em>remove</em> the default and set that feature flag through rustbuild</p>



<a name="209548290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/logging%20when%20using%20x.py/near/209548290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/logging.20when.20using.20x.2Epy.html#209548290">(Sep 09 2020 at 18:17)</a>:</h4>
<p>expanding this bit <a href="https://github.com/rust-lang/rust/blob/3f5e617e3630ad61aa35637bbe0ab704eada5974/src/bootstrap/lib.rs#L535-L536">https://github.com/rust-lang/rust/blob/3f5e617e3630ad61aa35637bbe0ab704eada5974/src/bootstrap/lib.rs#L535-L536</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>